<?php
namespace app\admin\behavior;
use app\admin\model\Role;
use think\Controller;

class CheckRole extends Controller
{
	public function run(){
		$role_id = session('role_id');
		if($role_id){
			$role = Role::where('id',$role_id)->value('role');
			$role = explode(',', $role);
			
			// if(!in_array(request()->routeInfo()['route'], $role)){
			// 	// echo (request()->routeInfo()['route']);
			
			// 	// $this->error('你没权限');
				
			// }
			
			
		}
	}
}